﻿<c:WindowExt x:Class="personalplaner.gui.stamm.windows.AddAbteilungToSchema"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:c="clr-namespace:personalplaner.common.controls;assembly=personalplaner.common"
        xmlns:vm="clr-namespace:personalplaner.common.mvvm.factory;assembly=personalplaner.common"
        xmlns:fac="clr-namespace:personalplaner.gui.stamm.viewmodels.factories"
        vm:ViewModelLoader.FactoryType="{x:Type fac:AddAbteilungToSchemaFactory}"
        ShowInTaskbar="False"
        WindowStartupLocation="CenterOwner"
        Height="380" Width="550" Foreground="#E1000000" >
    
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <!--<ResourceDictionary Source="/personalplaner.common;component/resources/TabControlStyles.xaml"/>-->
                <ResourceDictionary Source="/personalplaner.common;component/resources/styles/WhiteStyleTemplates.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
        <!-- 
        *****************************************************************
        ListBox Theme 
        *****************************************************************
        -->
        <!--<Style TargetType="{x:Type ListBox}">
            <Setter Property="Foreground" Value="#E1000000"/>
            <Setter Property="FontWeight" Value="Heavy"/>
            <Setter Property="BorderBrush" Value="#E1000000"/>
            <Setter Property="BorderThickness" Value="0,0,1,0"/>
            <Setter Property="Background" Value="Transparent"/>
        </Style>-->
    </Window.Resources>

    <Window.Background>
        <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
            <LinearGradientBrush.GradientStops>
                <GradientStop Color="White" Offset="0"/>
                <GradientStop Color="White" Offset="0.6"/>
                <GradientStop Color="#FFEDEDED" Offset="1"/>
            </LinearGradientBrush.GradientStops>
        </LinearGradientBrush>
    </Window.Background>
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <TextBlock Text="Team hinzufügen" FontSize="22" FontWeight="Thin" Foreground="#E1000000" Margin="50,-5,0,25"/>

        <Grid Grid.Row="1" Margin="20,0,20,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition />
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>

            <ListBox Grid.Row="1" Margin="20,0,20,0" BorderThickness="0,0,1,0"
                             ItemsSource="{Binding AbteilungenNichtZugeteilt}"
                             SelectedItem="{Binding SelectedAbteilungNichtZugeteilt}"
                             DisplayMemberPath="Name"/>
            
            <StackPanel Orientation="Vertical" Grid.Column="1">
                <Button Style="{StaticResource BoarderedButtonStyle}" Margin="5,0,5,5" Command="{Binding AddToListCommand}">
                    <Image Source="/personalplaner.gui;component/resources/images/Navigation Right.png" Style="{StaticResource ButtonImageStyle}" Height="16" Margin="2"/>
                </Button>
                <Button Style="{StaticResource BoarderedButtonStyle}" Margin="5,0,5,5" Command="{Binding RemoveFromListCommand}">
                    <Image Source="/personalplaner.gui;component/resources/images/Navigation Left.png" Style="{StaticResource ButtonImageStyle}" Height="16" Margin="2"/>
                </Button>
            </StackPanel>

            <ListBox Grid.Column="2" Margin="20,0,20,0" BorderThickness="0,0,1,0"
                             ItemsSource="{Binding AbteilungenZugeteilt}"
                             SelectedItem="{Binding SelectedAbteilungZugeteilt}"
                             DisplayMemberPath="Name"/>

            <StackPanel Orientation="Vertical" Grid.Column="3">
                <Button Style="{StaticResource BoarderedButtonStyle}" Margin="5,0,5,5" Command="{Binding MoveUpCommand}">
                    <Image Source="/personalplaner.gui;component/resources/images/Navigation Up.png" Style="{StaticResource ButtonImageStyle}" Height="16" Margin="2"/>
                </Button>
                <Button Style="{StaticResource BoarderedButtonStyle}" Margin="5,0,5,5" Command="{Binding MoveDownCommand}">
                    <Image Source="/personalplaner.gui;component/resources/images/Navigation Down.png" Style="{StaticResource ButtonImageStyle}" Height="16" Margin="2"/>
                </Button>
            </StackPanel>

        </Grid>

        <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,20,40,20">
            <Button MinWidth="60" Margin="5" IsDefault="True" 
                    Command="{Binding OkCommand}">
                <TextBlock Text="OK"/>
            </Button>
            <Button MinWidth="60" Margin="5" IsCancel="True" ><!--Command="{Binding CancelCommand}"-->
                <TextBlock Text="Abbrechen"/>
            </Button>
        </StackPanel>

    </Grid>
</c:WindowExt>
